package com.android.accessibility.upgrade;

import com.android.accessibility.utils.Printable;
import com.google.gson.annotations.SerializedName;

public class UpgradeInfo {
    @SerializedName("app_url")
    private String appUrl;

    @SerializedName("app_name")
    private String appName;

    @SerializedName("version_code")
    private int versionCode;

    @SerializedName("version_name")
    private String versionName;

    @SerializedName("release_time")
    private String releaseTime;

    @SerializedName("instructions")
    private String instructions;

    @SerializedName("channel")
    private String channel;

    @SerializedName("forceUpdate")
    private int forceUpdate;

    public String getAppUrl() {
        return appUrl;
    }

    public void setAppUrl(String appUrl) {
        this.appUrl = appUrl;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public int getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(int versionCode) {
        this.versionCode = versionCode;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(String releaseTime) {
        this.releaseTime = releaseTime;
    }

    public String getInstructions() {
        return instructions;
    }

    public void setInstructions(String instructions) {
        this.instructions = instructions;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public boolean isForceUpdate() {
        return forceUpdate != 0;
    }

    public void setForceUpdate(boolean forceUpdate) {
        this.forceUpdate = forceUpdate ? 1 : 0;
    }

    @Override
    public String toString() {
        return Printable.toString(this);
    }
}
